﻿Public Class MainForm

	Overridable Sub Connect()

	End Sub

	Sub New()
		InitializeComponent()
		TabStrip.Visible = False
	End Sub


	Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
		If keyData = Keys.Escape Then
			CloseTab()
			Return True
		End If
		Return MyBase.ProcessCmdKey(msg, keyData)
	End Function

	Overridable Sub CloseTab()
		TabStrip.CloseTab()
		TabStrip.Visible = TabStrip.Tabs.Count > 1
	End Sub

	Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
		FirefoxRenderer.PaintBackground(e.Graphics, sender.ClientRectangle)
	End Sub

End Class